import sys


file = open(sys.argv[1])
size = file.readline().rstrip('\n').split()
mini = 99999999
maxo = 0
suma = 0
num = 0
suma_t = 0
for i in range(0,30):
    boom = file.readline().split()
    if not boom: break
    boom_f = float(boom[0])
    boom_t = float(boom[1])
    suma += boom_f
    suma_t += boom_t
    num += 1
    if(boom_f>maxo):
        maxo = boom_f
    if(boom_f<mini):
        mini = boom_f
promedio = suma/num
promedio_t = suma_t/num
print ("%s %sx%s %d %d %0.2f %0.2f") % (sys.argv[1].split('/')[-1], size[0], size[1], mini, maxo, promedio, promedio_t)
file.close()
    
